﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:p="clr-namespace:Lithnet.Acma.Presentation"
                    xmlns:a="clr-namespace:Lithnet.Acma;assembly=Lithnet.Acma"
                    xmlns:fim="clr-namespace:Microsoft.MetadirectoryServices;assembly=Microsoft.MetadirectoryServicesEx"
                    xmlns:core="clr-namespace:Lithnet.Common.Presentation;assembly=Lithnet.Common.Presentation">

    <DataTemplate  DataType="{x:Type p:AcmaConstantsViewModel}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <Label Content="Constants"
                       Grid.Row="0"
                       Grid.Column="0" />

                    <DataGrid Grid.Row="0"
                              MinHeight="200"
                              Margin="0,5,0,5"
                              ItemsSource="{Binding Path=Model}"
                              AutoGenerateColumns="False">

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Name"
                                                Binding="{Binding Path=Name}" />
                            <DataGridTextColumn Header="Value"
                                                Binding="{Binding Path=Value}" />
                        </DataGrid.Columns>
                    </DataGrid>

            <StackPanel Grid.Row="1">
                    <Button Content="Save"
                            HorizontalAlignment="Left"
                            Command="{Binding Path=Commands.Save}" />
            </StackPanel>
        </Grid>
    </DataTemplate>
</ResourceDictionary>